Skip to main content

All Questions

0votes
2answers
1kviews

What does this part mean in find command with -exec \{\}? [duplicate]

I have this command (KSH) find <path> -regextype posix-extended -type f -regex '.*/txt' -exec ls -l --full-time \{\} \; | sort -bnr So, I'm reading and deciphering the command above so far what ...
Clem's user avatar
0votes
2answers
58views

Delete all other undefined directories

I need to create a purge script to remove any foreign directories from a specific list of directories. My idee was to do something like this : #!/bin/ksh find /data/${USER}/SAS/ -type d ! -name '...
Fosfor's user avatar
1vote
1answer
1kviews

Excluding specific folders while copying stuffs from one directory to another

I have to copy contents of some code from one folder called aim-db-dir to another called aim-db-dir_nosvn. aim-db-dir contains .svn folders in all the directories (and subdirectories) and these .svn ...
abhihello123's user avatar
3votes
2answers
2kviews

Remove old files in a directory except files present in an exception file

I am writing a shell script to delete old files (older than 60 days) in a directory except few files and these file names are maintained in an exception file present in another directory. I know the ...
Balaji's user avatar
47votes
4answers
43kviews

Executing user defined function in a find -exec call

I'm on Solaris 10 and I have tested the following with ksh (88), bash (3.00) and zsh (4.2.1). The following code doesn't yield any result: function foo { echo "Hello World" } find somedir -exec ...
rahmu's user avatar
  • 20.4k

close